<div id="loginModal" class="modal fade user-login-modal" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel" aria-hidden="true" (click)="changeModal('hide')">
    <div class="modal-dialog">
        <div class="modal-content" (click)="$event.stopPropagation()">
            <div class="modal-body">
                <img *ngIf="userService.isToken" src="/static/images/close_icon.png" alt="close" class="btn-close" (click)="changeModal('hide')">
                <div class="loginSwitch">
                    <span (click)="loginSwitch('zh')" [class.active]="flag === 'zh'">帐号登录</span>
                    <span (click)="loginSwitch('sj')" [class.active]="flag === 'sj'">手机登录</span>
                    <div *ngIf="flag === 'zh'" class="zh"></div>
                    <div *ngIf="flag === 'sj'" class="sj"></div>
                </div>
                <form *ngIf="flag === 'zh'" role="form" name="loginForm" class="form-horizontal" novalidate>
                    <div class="form-group input-form">
                        <img src="/static/images/user_id.png" alt="user-id" class="user-id-img">
                        <input id="login-mobile" name="mobile" type="tel" required [(ngModel)]="loginUser.mobile" placeholder="请输入手机号">
                    </div>
                    <div class="form-group input-form">
                        <img src="/static/images/user_pw.png" alt="user-pw" class="user-pw-img">
                        <input class="login-password" name="password" type="password" required [(ngModel)]="loginUser.passwd" placeholder="请输入密码" autocomplete="off" spellcheck="false" ng-minlength="6">
                    </div>
                    <div class="form-group forget-form">
                        <!-- <span class="login-err" *ngIf="errText">{{errText}}</span> -->
                        <span class="forget-password" (click)="changeModal('findpwd')">忘记密码？</span>
                        <div class="goSignup">
                            还没帐号？去
                            <span (click)="changeModal('signup')">注册</span>
                        </div>
                    </div>
                    <div class="form-group login-form">
                        <div class="button-style" [class.disabled]="!(this.loginUser.mobile && this.loginUser.passwd)">
                            <button class="btn btn-primary" type="submit" (click)="login()">登录</button>
                        </div>
                        <div class="login-err"><span *ngIf="errText">{{errText}}</span></div>
                    </div>
                </form>
                <form *ngIf="flag === 'sj'" role="form" name="loginForm" class="form-mobile" novalidate>
                    <div class="form-group input-form">
                        <img src="/static/images/user_id.png" alt="user-id" class="user-id-img">
                        <input id="login-mobile" name="mobile" type="tel" required [(ngModel)]="mobileUser.mobile" placeholder="请输入手机号">
                    </div>
                    <div class="form-group input-form otp-form">
                        <img src="/static/images/user_sms.png" alt="user-sms" class="user-sms-img">
                        <input class="form-control otp" id="login-smsCode" name="smsCode" type="text" [(ngModel)]="mobileUser.smsCode" placeholder="请输入验证码" ng-minlength="6" ng-maxlength="6" required>
                        <span class="getSms" (click)="sendSmsCode(); $event.preventDefault();" *ngIf="waitTime<=0">获取验证码</span>
                        <span class="disabled" *ngIf="waitTime>0">重新发送({{waitTime}})</span>
                    </div>
                    <div class="form-group forget-form">
                        <!-- <span class="login-err" *ngIf="errText">{{errText}}</span> -->
                        <div class="agreement">
                            温馨提示：未注册众赢财富通帐号的手机号，登录时将自动注册，且代表您已经同意
                            <span (click)="clickAgreement()">《用户协议》</span>
                        </div>
                    </div>
                    <div class="form-group login-form">
                        <div class="button-style" [class.disabled]="!(this.mobileUser.mobile && this.mobileUser.smsCode && this.mobileUser.smsToken)">
                            <button class="btn btn-primary" type="submit" (click)="mobileLogin()">登录</button>
                        </div>
                        <div class="login-err"><span *ngIf="errText">{{errText}}</span></div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <div class="left"></div>
                <span class="other-login">其他登录方式</span>
                <div class="right"></div>
                <ul>
                    <li>
                        <img (click)="oauth('wechat')" src="/static/images/login_wechat.png" (mouseout)="activeType = ''" (mouseover)="activeType = 'wechat';">
                        <span [class.active]="activeType === 'wechat'">微信</span>
                    </li>
                    <li>
                        <img (click)="oauth('qywechat')" src="/static/images/login_qywx.png" (mouseout)="activeType = ''" (mouseover)="activeType = 'qywechat';">
                        <span [class.active]="activeType === 'qywechat'">企业微信</span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<user-agreement *ngIf="status === 'clicked'" (setModal)="closeAgreement($event)"></user-agreement>